#ifndef CONST_SEARCH_MATRIX_H
#define CONST_SEARCH_MATRIX_H
typedef struct tagAPOINT{short x;short y;}APOINT;/*G_SearchPointGroup Search Matrix */
static APOINT G_SearchPointGroup[1520]=
{
//0 
{1,0},{0,-1},{-1,0},{0,1},//4
                          {1,1},{-1,1},{-1,-1},{1,-1},//8
{2,-1},{2,0},{2,1},{2,2},{1,2},{0,2},{-1,2},{-2,2},{-2,1},{-2,0},{-2,-1},{-2,-2},{-1,-2},{0,-2},{1,-2},{2,-2},//24 
{3,-2},{3,-1},{3,0},{3,1},{3,2},{3,3},{2,3},{1,3},{0,3},{-1,3},{-2,3},{-3,3},{-3,2},{-3,1},{-3,0},{-3,-1},{-3,-2},{-3,-3},{-2,-3},{-1,-3},{0,-3},{1,-3},{2,-3},{3,-3},//48 
{4,-3},{4,-2},{4,-1},{4,0},{4,1},{4,2},{4,3},{4,4},{3,4},{2,4},{1,4},{0,4},{-1,4},{-2,4},{-3,4},{-4,4},{-4,3},{-4,2},{-4,1},{-4,0},{-4,-1},{-4,-2},{-4,-3},{-4,-4},{-3,-4},{-2,-4},{-1,-4},{0,-4},{1,-4},{2,-4},{3,-4},{4,-4},//80 
{5,-4},{5,-3},{5,-2},{5,-1},{5,0},{5,1},{5,2},{5,3},{5,4},{5,5},{4,5},{3,5},{2,5},{1,5},{0,5},{-1,5},{-2,5},{-3,5},{-4,5},{-5,5},{-5,4},{-5,3},{-5,2},{-5,1},{-5,0},{-5,-1},{-5,-2},{-5,-3},{-5,-4},{-5,-5},{-4,-5},{-3,-5},{-2,-5},{-1,-5},{0,-5},{1,-5},{2,-5},{3,-5},{4,-5},{5,-5},//120 
{6,-5},{6,-4},{6,-3},{6,-2},{6,-1},{6,0},{6,1},{6,2},{6,3},{6,4},{6,5},{6,6},{5,6},{4,6},{3,6},{2,6},{1,6},{0,6},{-1,6},{-2,6},{-3,6},{-4,6},{-5,6},{-6,6},{-6,5},{-6,4},{-6,3},{-6,2},{-6,1},{-6,0},{-6,-1},{-6,-2},{-6,-3},{-6,-4},{-6,-5},{-6,-6},{-5,-6},{-4,-6},{-3,-6},{-2,-6},{-1,-6},{0,-6},{1,-6},{2,-6},{3,-6},{4,-6},{5,-6},{6,-6},//168 
{7,-6},{7,-5},{7,-4},{7,-3},{7,-2},{7,-1},{7,0},{7,1},{7,2},{7,3},{7,4},{7,5},{7,6},{7,7},{6,7},{5,7},{4,7},{3,7},{2,7},{1,7},{0,7},{-1,7},{-2,7},{-3,7},{-4,7},{-5,7},{-6,7},{-7,7},{-7,6},{-7,5},{-7,4},{-7,3},{-7,2},{-7,1},{-7,0},{-7,-1},{-7,-2},{-7,-3},{-7,-4},{-7,-5},{-7,-6},{-7,-7},{-6,-7},{-5,-7},{-4,-7},{-3,-7},{-2,-7},{-1,-7},{0,-7},{1,-7},{2,-7},{3,-7},{4,-7},{5,-7},{6,-7},{7,-7},//224 
{8,-7},{8,-6},{8,-5},{8,-4},{8,-3},{8,-2},{8,-1},{8,0},{8,1},{8,2},{8,3},{8,4},{8,5},{8,6},{8,7},{8,8},{7,8},{6,8},{5,8},{4,8},{3,8},{2,8},{1,8},{0,8},{-1,8},{-2,8},{-3,8},{-4,8},{-5,8},{-6,8},{-7,8},{-8,8},{-8,7},{-8,6},{-8,5},{-8,4},{-8,3},{-8,2},{-8,1},{-8,0},{-8,-1},{-8,-2},{-8,-3},{-8,-4},{-8,-5},{-8,-6},{-8,-7},{-8,-8},{-7,-8},{-6,-8},{-5,-8},{-4,-8},{-3,-8},{-2,-8},{-1,-8},{0,-8},{1,-8},{2,-8},{3,-8},{4,-8},{5,-8},{6,-8},{7,-8},{8,-8},//288 
{9,-8},{9,-7},{9,-6},{9,-5},{9,-4},{9,-3},{9,-2},{9,-1},{9,0},{9,1},{9,2},{9,3},{9,4},{9,5},{9,6},{9,7},{9,8},{9,9},{8,9},{7,9},{6,9},{5,9},{4,9},{3,9},{2,9},{1,9},{0,9},{-1,9},{-2,9},{-3,9},{-4,9},{-5,9},{-6,9},{-7,9},{-8,9},{-9,9},{-9,8},{-9,7},{-9,6},{-9,5},{-9,4},{-9,3},{-9,2},{-9,1},{-9,0},{-9,-1},{-9,-2},{-9,-3},{-9,-4},{-9,-5},{-9,-6},{-9,-7},{-9,-8},{-9,-9},{-8,-9},{-7,-9},{-6,-9},{-5,-9},{-4,-9},{-3,-9},{-2,-9},{-1,-9},{0,-9},{1,-9},{2,-9},{3,-9},{4,-9},{5,-9},{6,-9},{7,-9},{8,-9},{9,-9},//360 
{10,-9},{10,-8},{10,-7},{10,-6},{10,-5},{10,-4},{10,-3},{10,-2},{10,-1},{10,0},{10,1},{10,2},{10,3},{10,4},{10,5},{10,6},{10,7},{10,8},{10,9},{10,10},{9,10},{8,10},{7,10},{6,10},{5,10},{4,10},{3,10},{2,10},{1,10},{0,10},{-1,10},{-2,10},{-3,10},{-4,10},{-5,10},{-6,10},{-7,10},{-8,10},{-9,10},{-10,10},{-10,9},{-10,8},{-10,7},{-10,6},{-10,5},{-10,4},{-10,3},{-10,2},{-10,1},{-10,0},{-10,-1},{-10,-2},{-10,-3},{-10,-4},{-10,-5},{-10,-6},{-10,-7},{-10,-8},{-10,-9},{-10,-10},{-9,-10},{-8,-10},{-7,-10},{-6,-10},{-5,-10},{-4,-10},{-3,-10},{-2,-10},{-1,-10},{0,-10},{1,-10},{2,-10},{3,-10},{4,-10},{5,-10},{6,-10},{7,-10},{8,-10},{9,-10},{10,-10},//440 
{11,-10},{11,-9},{11,-8},{11,-7},{11,-6},{11,-5},{11,-4},{11,-3},{11,-2},{11,-1},{11,0},{11,1},{11,2},{11,3},{11,4},{11,5},{11,6},{11,7},{11,8},{11,9},{11,10},{11,11},{10,11},{9,11},{8,11},{7,11},{6,11},{5,11},{4,11},{3,11},{2,11},{1,11},{0,11},{-1,11},{-2,11},{-3,11},{-4,11},{-5,11},{-6,11},{-7,11},{-8,11},{-9,11},{-10,11},{-11,11},{-11,10},{-11,9},{-11,8},{-11,7},{-11,6},{-11,5},{-11,4},{-11,3},{-11,2},{-11,1},{-11,0},{-11,-1},{-11,-2},{-11,-3},{-11,-4},{-11,-5},{-11,-6},{-11,-7},{-11,-8},{-11,-9},{-11,-10},{-11,-11},{-10,-11},{-9,-11},{-8,-11},{-7,-11},{-6,-11},{-5,-11},{-4,-11},{-3,-11},{-2,-11},{-1,-11},{0,-11},{1,-11},{2,-11},{3,-11},{4,-11},{5,-11},{6,-11},{7,-11},{8,-11},{9,-11},{10,-11},{11,-11},//528 
{12,-11},{12,-10},{12,-9},{12,-8},{12,-7},{12,-6},{12,-5},{12,-4},{12,-3},{12,-2},{12,-1},{12,0},{12,1},{12,2},{12,3},{12,4},{12,5},{12,6},{12,7},{12,8},{12,9},{12,10},{12,11},{12,12},{11,12},{10,12},{9,12},{8,12},{7,12},{6,12},{5,12},{4,12},{3,12},{2,12},{1,12},{0,12},{-1,12},{-2,12},{-3,12},{-4,12},{-5,12},{-6,12},{-7,12},{-8,12},{-9,12},{-10,12},{-11,12},{-12,12},{-12,11},{-12,10},{-12,9},{-12,8},{-12,7},{-12,6},{-12,5},{-12,4},{-12,3},{-12,2},{-12,1},{-12,0},{-12,-1},{-12,-2},{-12,-3},{-12,-4},{-12,-5},{-12,-6},{-12,-7},{-12,-8},{-12,-9},{-12,-10},{-12,-11},{-12,-12},{-11,-12},{-10,-12},{-9,-12},{-8,-12},{-7,-12},{-6,-12},{-5,-12},{-4,-12},{-3,-12},{-2,-12},{-1,-12},{0,-12},{1,-12},{2,-12},{3,-12},{4,-12},{5,-12},{6,-12},{7,-12},{8,-12},{9,-12},{10,-12},{11,-12},{12,-12},//624 
{13,-12},{13,-11},{13,-10},{13,-9},{13,-8},{13,-7},{13,-6},{13,-5},{13,-4},{13,-3},{13,-2},{13,-1},{13,0},{13,1},{13,2},{13,3},{13,4},{13,5},{13,6},{13,7},{13,8},{13,9},{13,10},{13,11},{13,12},{13,13},{12,13},{11,13},{10,13},{9,13},{8,13},{7,13},{6,13},{5,13},{4,13},{3,13},{2,13},{1,13},{0,13},{-1,13},{-2,13},{-3,13},{-4,13},{-5,13},{-6,13},{-7,13},{-8,13},{-9,13},{-10,13},{-11,13},{-12,13},{-13,13},{-13,12},{-13,11},{-13,10},{-13,9},{-13,8},{-13,7},{-13,6},{-13,5},{-13,4},{-13,3},{-13,2},{-13,1},{-13,0},{-13,-1},{-13,-2},{-13,-3},{-13,-4},{-13,-5},{-13,-6},{-13,-7},{-13,-8},{-13,-9},{-13,-10},{-13,-11},{-13,-12},{-13,-13},{-12,-13},{-11,-13},{-10,-13},{-9,-13},{-8,-13},{-7,-13},{-6,-13},{-5,-13},{-4,-13},{-3,-13},{-2,-13},{-1,-13},{0,-13},{1,-13},{2,-13},{3,-13},{4,-13},{5,-13},{6,-13},{7,-13},{8,-13},{9,-13},{10,-13},{11,-13},{12,-13},{13,-13},//728 
{14,-13},{14,-12},{14,-11},{14,-10},{14,-9},{14,-8},{14,-7},{14,-6},{14,-5},{14,-4},{14,-3},{14,-2},{14,-1},{14,0},{14,1},{14,2},{14,3},{14,4},{14,5},{14,6},{14,7},{14,8},{14,9},{14,10},{14,11},{14,12},{14,13},{14,14},{13,14},{12,14},{11,14},{10,14},{9,14},{8,14},{7,14},{6,14},{5,14},{4,14},{3,14},{2,14},{1,14},{0,14},{-1,14},{-2,14},{-3,14},{-4,14},{-5,14},{-6,14},{-7,14},{-8,14},{-9,14},{-10,14},{-11,14},{-12,14},{-13,14},{-14,14},{-14,13},{-14,12},{-14,11},{-14,10},{-14,9},{-14,8},{-14,7},{-14,6},{-14,5},{-14,4},{-14,3},{-14,2},{-14,1},{-14,0},{-14,-1},{-14,-2},{-14,-3},{-14,-4},{-14,-5},{-14,-6},{-14,-7},{-14,-8},{-14,-9},{-14,-10},{-14,-11},{-14,-12},{-14,-13},{-14,-14},{-13,-14},{-12,-14},{-11,-14},{-10,-14},{-9,-14},{-8,-14},{-7,-14},{-6,-14},{-5,-14},{-4,-14},{-3,-14},{-2,-14},{-1,-14},{0,-14},{1,-14},{2,-14},{3,-14},{4,-14},{5,-14},{6,-14},{7,-14},{8,-14},{9,-14},{10,-14},{11,-14},{12,-14},{13,-14},{14,-14},//840 
{15,-14},{15,-13},{15,-12},{15,-11},{15,-10},{15,-9},{15,-8},{15,-7},{15,-6},{15,-5},{15,-4},{15,-3},{15,-2},{15,-1},{15,0},{15,1},{15,2},{15,3},{15,4},{15,5},{15,6},{15,7},{15,8},{15,9},{15,10},{15,11},{15,12},{15,13},{15,14},{15,15},{14,15},{13,15},{12,15},{11,15},{10,15},{9,15},{8,15},{7,15},{6,15},{5,15},{4,15},{3,15},{2,15},{1,15},{0,15},{-1,15},{-2,15},{-3,15},{-4,15},{-5,15},{-6,15},{-7,15},{-8,15},{-9,15},{-10,15},{-11,15},{-12,15},{-13,15},{-14,15},{-15,15},{-15,14},{-15,13},{-15,12},{-15,11},{-15,10},{-15,9},{-15,8},{-15,7},{-15,6},{-15,5},{-15,4},{-15,3},{-15,2},{-15,1},{-15,0},{-15,-1},{-15,-2},{-15,-3},{-15,-4},{-15,-5},{-15,-6},{-15,-7},{-15,-8},{-15,-9},{-15,-10},{-15,-11},{-15,-12},{-15,-13},{-15,-14},{-15,-15},{-14,-15},{-13,-15},{-12,-15},{-11,-15},{-10,-15},{-9,-15},{-8,-15},{-7,-15},{-6,-15},{-5,-15},{-4,-15},{-3,-15},{-2,-15},{-1,-15},{0,-15},{1,-15},{2,-15},{3,-15},{4,-15},{5,-15},{6,-15},{7,-15},{8,-15},{9,-15},{10,-15},{11,-15},{12,-15},{13,-15},{14,-15},{15,-15},//960 
{16,-15},{16,-14},{16,-13},{16,-12},{16,-11},{16,-10},{16,-9},{16,-8},
    {16,-7},{16,-6},{16,-5},{16,-4},{16,-3},{16,-2},{16,-1},{16,0},{16,1},{16,2},
    {16,3},{16,4},{16,5},{16,6},{16,7},{16,8},{16,9},{16,10},{16,11},{16,12},{16,13},{16,14},{16,15},{16,16},{15,16},{14,16},{13,16},{12,16},
    {11,16},{10,16},{9,16},{8,16},{7,16},
    {6,16},{5,16},{4,16},{3,16},{2,16},
    {1,16},{0,16},
    {-1,16},{-2,16},{-3,16},{-4,16},{-5,16},
    {-6,16},{-7,16},{-8,16},{-9,16},{-10,16},{-11,16},{-12,16},{-13,16},{-14,16},{-15,16},{-16,16},{-16,15},{-16,14},{-16,13},{-16,12},{-16,11},{-16,10},{-16,9},{-16,8},{-16,7},{-16,6},{-16,5},{-16,4},{-16,3},{-16,2},{-16,1},{-16,0},{-16,-1},{-16,-2},
    {-16,-3},{-16,-4},{-16,-5},{-16,-6},{-16,-7},{-16,-8},{-16,-9},{-16,-10},{-16,-11},
    {-16,-12},{-16,-13},{-16,-14},{-16,-15},{-16,-16},{-15,-16},{-14,-16},{-13,-16},{-12,-16},{-11,-16},{-10,-16},{-9,-16},{-8,-16},{-7,-16},{-6,-16},{-5,-16},{-4,-16},{-3,-16},
    {-2,-16},{-1,-16},{0,-16},{1,-16},{2,-16},{3,-16},{4,-16},{5,-16},{6,-16},{7,-16},{8,-16},{9,-16},{10,-16},{11,-16},{12,-16},{13,-16},{14,-16},{15,-16},{16,-16},//1088
{17,-16},{17,-15},{17,-14},{17,-13},{17,-12},{17,-11},{17,-10},{17,-9},{17,-8},{17,-7},{17,-6},{17,-5},{17,-4},{17,-3},{17,-2},{17,-1},{17,0},{17,1},{17,2},{17,3},{17,4},{17,5},{17,6},{17,7},{17,8},{17,9},{17,10},{17,11},{17,12},{17,13},{17,14},{17,15},{17,16},{17,17},{16,17},{15,17},{14,17},{13,17},{12,17},{11,17},{10,17},{9,17},{8,17},{7,17},{6,17},{5,17},{4,17},{3,17},{2,17},{1,17},{0,17},{-1,17},{-2,17},{-3,17},{-4,17},{-5,17},{-6,17},{-7,17},{-8,17},{-9,17},{-10,17},{-11,17},{-12,17},{-13,17},{-14,17},{-15,17},{-16,17},{-17,17},{-17,16},{-17,15},{-17,14},{-17,13},{-17,12},{-17,11},{-17,10},{-17,9},{-17,8},{-17,7},{-17,6},{-17,5},{-17,4},{-17,3},{-17,2},{-17,1},{-17,0},{-17,-1},{-17,-2},{-17,-3},{-17,-4},{-17,-5},{-17,-6},{-17,-7},{-17,-8},{-17,-9},{-17,-10},{-17,-11},{-17,-12},{-17,-13},{-17,-14},{-17,-15},{-17,-16},{-17,-17},{-16,-17},{-15,-17},{-14,-17},{-13,-17},{-12,-17},{-11,-17},{-10,-17},{-9,-17},{-8,-17},{-7,-17},{-6,-17},{-5,-17},{-4,-17},{-3,-17},{-2,-17},{-1,-17},{0,-17},{1,-17},{2,-17},{3,-17},{4,-17},{5,-17},{6,-17},{7,-17},{8,-17},{9,-17},{10,-17},{11,-17},{12,-17},{13,-17},{14,-17},{15,-17},{16,-17},{17,-17},//1224 
{18,-17},{18,-16},{18,-15},{18,-14},{18,-13},{18,-12},{18,-11},{18,-10},{18,-9},{18,-8},{18,-7},{18,-6},{18,-5},{18,-4},{18,-3},{18,-2},{18,-1},{18,0},{18,1},{18,2},{18,3},{18,4},{18,5},{18,6},{18,7},{18,8},{18,9},{18,10},{18,11},{18,12},{18,13},{18,14},{18,15},{18,16},{18,17},{18,18},{17,18},{16,18},{15,18},{14,18},{13,18},{12,18},{11,18},{10,18},{9,18},{8,18},{7,18},{6,18},{5,18},{4,18},{3,18},{2,18},{1,18},{0,18},{-1,18},{-2,18},{-3,18},{-4,18},{-5,18},{-6,18},{-7,18},{-8,18},{-9,18},{-10,18},{-11,18},{-12,18},{-13,18},{-14,18},{-15,18},{-16,18},{-17,18},{-18,18},{-18,17},{-18,16},{-18,15},{-18,14},{-18,13},{-18,12},{-18,11},{-18,10},{-18,9},{-18,8},{-18,7},{-18,6},{-18,5},{-18,4},{-18,3},{-18,2},{-18,1},{-18,0},{-18,-1},{-18,-2},{-18,-3},{-18,-4},{-18,-5},{-18,-6},{-18,-7},{-18,-8},{-18,-9},{-18,-10},{-18,-11},{-18,-12},{-18,-13},{-18,-14},{-18,-15},{-18,-16},{-18,-17},{-18,-18},{-17,-18},{-16,-18},{-15,-18},{-14,-18},{-13,-18},{-12,-18},{-11,-18},{-10,-18},{-9,-18},{-8,-18},{-7,-18},{-6,-18},{-5,-18},{-4,-18},{-3,-18},{-2,-18},{-1,-18},{0,-18},{1,-18},{2,-18},{3,-18},{4,-18},{5,-18},{6,-18},{7,-18},{8,-18},{9,-18},{10,-18},{11,-18},{12,-18},{13,-18},{14,-18},{15,-18},{16,-18},{17,-18},{18,-18},//1368 
{19,-18},{19,-17},{19,-16},{19,-15},{19,-14},{19,-13},{19,-12},{19,-11},{19,-10},{19,-9},{19,-8},{19,-7},{19,-6},{19,-5},{19,-4},{19,-3},{19,-2},{19,-1},{19,0},{19,1},{19,2},{19,3},{19,4},{19,5},{19,6},{19,7},{19,8},{19,9},{19,10},{19,11},{19,12},{19,13},{19,14},{19,15},{19,16},{19,17},{19,18},{19,19},{18,19},{17,19},{16,19},{15,19},{14,19},{13,19},{12,19},{11,19},{10,19},{9,19},{8,19},{7,19},{6,19},{5,19},{4,19},{3,19},{2,19},{1,19},{0,19},{-1,19},{-2,19},{-3,19},{-4,19},{-5,19},{-6,19},{-7,19},{-8,19},{-9,19},{-10,19},{-11,19},{-12,19},{-13,19},{-14,19},{-15,19},{-16,19},{-17,19},{-18,19},{-19,19},{-19,18},{-19,17},{-19,16},{-19,15},{-19,14},{-19,13},{-19,12},{-19,11},{-19,10},{-19,9},{-19,8},{-19,7},{-19,6},{-19,5},{-19,4},{-19,3},{-19,2},{-19,1},{-19,0},{-19,-1},{-19,-2},{-19,-3},{-19,-4},{-19,-5},{-19,-6},{-19,-7},{-19,-8},{-19,-9},{-19,-10},{-19,-11},{-19,-12},{-19,-13},{-19,-14},{-19,-15},{-19,-16},{-19,-17},{-19,-18},{-19,-19},{-18,-19},{-17,-19},{-16,-19},{-15,-19},{-14,-19},{-13,-19},{-12,-19},{-11,-19},{-10,-19},{-9,-19},{-8,-19},{-7,-19},{-6,-19},{-5,-19},{-4,-19},{-3,-19},{-2,-19},{-1,-19},{0,-19},{1,-19},{2,-19},{3,-19},{4,-19},{5,-19},{6,-19},{7,-19},{8,-19},{9,-19},{10,-19},{11,-19},{12,-19},{13,-19},{14,-19},{15,-19},{16,-19},{17,-19},{18,-19},{19,-19},//1520 

};
#endif
